1 //自动关注脚本
auto();
device.keepScreenOn();
var b=rawInput("关注抖音的关键字","");
var c=rawInput("关注多少个，不建议超过60个","");
launchApp("抖音短视频");
sleep("5000");
setScreenMetrics(1080,1920);
sleep("3000");
click("我");//988, 1766
 sleep(4000);
 click("朋友");//988, 1766
 sleep(2000);
 click(264, 236);//搜索框
 sleep(3000);
 setText(b);
 sleep(2000);
 click("搜索");//搜索1009, 252
 sleep(3000);
 click(958, 388);
 sleep(1*1*1000);
 click(499, 388);//点进去朋友里
 sleep(2000);
 var a=text("粉丝").findOne(5000)
if(a!=null){
   let xy= a.bounds()
   click(xy.centerX(),xy.centerY())
}else{
    toastLog("找不到节点")
}
 sleep(3000);
 for(var num=1;true;num++){
 var target =  text("关注").findOnce() || text("回关").findOnce();
  if (target == null) {
swipe(device.width/622,1768,device.width/542,222,860);
}
     else
     target.click();
    sleep(10000);
if(num==c)
{ break;}
}